package com.example.hello

class Fruits {

    private String fruitName
    private String fruitColor

    def setFruitName(String name) {
        fruitName = name
    }
    
    def setFruitColor(String color) {
        fruitColor = color
    }

    def getFruitName() {
        println "fruit name is ${fruitName}"
    }

    def getFruitColor() {
        println "fruit color is ${fruitColor}"
    }

    static void main(args) {
        Fruits apple = new Fruits()
        apple.setFruitName("Apple")
        apple.setFruitColor("Red")

        apple.getFruitName()
        apple.getFruitColor()
    }

}